package roguelike.creatures;

import roguelike.creatures.ai.PlayerAi;
import roguelike.creatures.ai.GoblinAi;
import roguelike.creatures.ai.FungusAi;
import roguelike.creatures.Creature;
import asciiPanel.AsciiPanel;
import java.util.List;
import roguelike.World;

public class CreatureFactory
{
    private World world;
    
    public CreatureFactory(World world)
    {
        this.world = world;
    }
    
    public Creature newPlayer(List<String> messages)
    {
        Creature player = new Creature(world, '@', AsciiPanel.brightWhite, 100, 20, 5);
        world.addAtEmptyLocation(player, 0);
        new PlayerAi(player, messages);
        return player;
    }
    
    public Creature newFungus(int depth)
    {
        Creature fungus = new Creature(world, 'f', AsciiPanel.brightGreen, 10, 0, 0);
        world.addAtEmptyLocation(fungus, depth);
        new FungusAi(fungus, this);
        return fungus;
    }
    
    public Creature newGoblin(int depth)
    {
        Creature goblin = new Creature(world, 'g', AsciiPanel.green, 15, 0, 5);
        world.addAtEmptyLocation(goblin, depth);
        new GoblinAi(goblin, this);
        return goblin;
    }
}
